package com.yantong.mapper;

import com.yantong.pojo.JuheOrder;
import com.yantong.pojo.JuheOrderExample;
import com.yantong.pojo.vo.JuheOrderSplitVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface JuheOrderMapper {
    long countByExample(JuheOrderExample example);

    int deleteByExample(JuheOrderExample example);

    int insert(JuheOrder record);

    int insertSelective(JuheOrder record);

    List<JuheOrder> selectByExample(JuheOrderExample example);

    int updateByExampleSelective(@Param("record") JuheOrder record, @Param("example") JuheOrderExample example);

    int updateByExample(@Param("record") JuheOrder record, @Param("example") JuheOrderExample example);

    JuheOrder selectOrderByOutTradeNo(String outTradeNo);

    JuheOrder selectByRefundNo(String refundNo);

    int updaPayParams(@Param("payno") String payno, @Param("paystatus") int paystatus, @Param("yplServiceMoney") BigDecimal yplServiceMoney, @Param("id") Long id);

    int totalByParams(Map<String, Object> params);

    List<JuheOrder> listByParams(Map<String, Object> params, RowBounds rowBounds);

    int updateById(JuheOrder juheOrder);

    /**
     * 聚合支付  券核销
     * @param day
     * @return
     */
    List<JuheOrderSplitVo> getJuheOrderSplitByPayTime(@Param("day") Integer day);

    /**
     * 大礼包  券核销
     * @param day
     * @return
     */
    List<JuheOrderSplitVo> getGiftOrderSplitByPayTime(@Param("day") Integer day);

    JuheOrder selectById(@Param("id") Long id);
}